import request from '@/utils/request'

// 查询节目下载列表
export function listDownload(query) {
  return request({
    url: '/ips/download/list',
    method: 'get',
    params: query
  })
}

// 节目下发统计列表
export function statList(query) {
  return request({
    url: '/ips/download/statList',
    method: 'get',
    params: query
  })
}

// 查询节目下载详细
export function getDownload(id) {
  return request({
    url: '/ips/download/' + id,
    method: 'get'
  })
}

// 新增节目下载
export function addDownload(data) {
  return request({
    url: '/ips/download/save',
    method: 'post',
    data: data
  })
}

// 修改节目下载
export function editDownload(data) {
  return request({
    url: '/ips/download/update',
    method: 'put',
    data: data
  })
}

// 删除节目下载
export function delDownload(id) {
  return request({
    url: '/ips/download/remove/' + id,
    method: 'delete'
  })
}

// 导出节目下载
export function exportDownload(query,id) {
  return request({
    url: '/ips/download/export/'+id,
    method: 'get',
    params: query
  })
}

// 重新下发
export function resend(id) {
  return request({
    url: '/ips/download/resend/' + id,
    method: 'get'
  })
}
